package com.briup.common.exception;

import com.briup.common.response.CodeAndMessageEnum;
import org.springframework.web.bind.annotation.RequestAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class ExceptionController {

    @RequestMapping("/exception")
    public void exception(@RequestAttribute Exception exception) {
        throw new SystemException(exception.getMessage(), CodeAndMessageEnum.JSON_WEB_TOKEN_INVALID);
    }
}
